package com.pactera.madp.cp.context;

import com.pactera.madp.cp.api.entity.sync.SyncStateEntity;
import lombok.experimental.UtilityClass;

@UtilityClass
public class SyncStateContext {

    private final ThreadLocal<SyncStateEntity> THREAD_LOCAL_STATE = new ThreadLocal<>();

    public SyncStateEntity get() {
        return THREAD_LOCAL_STATE.get();
    }

    public void set(SyncStateEntity syncStateEntity) {
        THREAD_LOCAL_STATE.set(syncStateEntity);
    }

    public void remove() {
        THREAD_LOCAL_STATE.remove();
    }

}
